 
#[derive(Debug)]
 
enum Res<T,E> {
    Object(T),
    Error(E)
}

fn di(arg1: i32, arg2: i32) -> Res<i32, String>{
    if arg2 == 0 { return Res::Error("error, no zero pls ...".to_string()) }
    Res::Object(arg1/arg2)
}

fn main(){
    let res = di(10, 2);
    let b = di(10, 3);
    if let Res::Object(n) = res { 
        println!("{}", n);
    }
    if let Res::Object(n) = b { println!("{}", n); }
    if let Res::Error(n) = di(10,0) { println!("{:?}", n); }


}